#ifndef _BOARD_H
#define _BOARD_H

#include "tetris.h"

struct tile_info
{
  int     exist;
  int     tile_index;
};

struct tetris_board
{
  HWND                wnd;
  HDC                 dc, mem_dc;
  HGDIOBJ             bitmap, brush;

  unsigned            game_speed;
  int                 is_paused;

  struct brick_info*  brick;
  int                 brick_x, brick_y;
  unsigned            brick_move_time;

  int                 prompt_brick_x, prompt_brick_y;

  struct tile_info    tile_buf[TILE_Y][TILE_X];

  struct bitmap*      brick_tile[MAX_TILE_COUNT];
  struct bitmap*      prompt_tile;
};

void*   create_board(HWND wnd);
void    board_check_key(void* board, char key);
void    update_board(void* board);
void    destroy_board(void* board);

#endif  // _BOARD_H
